home *** CD-ROM | disk | FTP | other *** search
/ Hackers Handbook - Millenium Edition / Hackers Handbook.iso / library / hack99 / win98explorer.txt < prev    next >
Encoding:
Internet Message Format  |  1999-03-24  |  6.4 KB

  1. Date: Mon, 9 Feb 1998 17:49:45 -0800
  2. From: Scott <smc@visuallink.com>
  3. To: BUGTRAQ@netspace.org
  4. Subject: Another Windows98 Bug...
  5.  
  6.  
  7. I'm not sure about the details of this problem, but when testing another buffer overflow, I
  8. created a long filename called "testfile.txtááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááááá "
  9. (note the chr(160)'s at the end) It is 235 characters in length.á After creating it on my desktop,
  10. I right clicked on it; explorer crashed saying it caused an illegal operation.á the only way I
  11. found to close this was by using command.comá I sent this to a friend and he got the same error.
  12. á
  13. ááááááá -Scott Campbell (smc@visuallink.com)
  14.  
  15. -------------------------------------------------------------------------------------
  16.  
  17. Date: Fri, 12 Feb 1999 17:37:57 -0800
  18. From: Scott <smc@visuallink.com>
  19. To: BUGTRAQ@netspace.org
  20. Subject: Another Windows98 Bug (Cont'd)
  21.  
  22.  
  23.     The easiest way to get rid of one of these files with an 'extra long'
  24. filename, is to drag it to the recycle bin (that seemed to work fine for me)
  25.  
  26. All I did to create the long filename is right click on the desktop
  27. filename, go to 'rename', and copy and paste chr(160) many times until
  28. nothing would paste anymore.  (note: this DOES work with other alpha-numeric
  29. characters.  This must just be bad error checking by Microsoft
  30.  
  31. I used Start->Find, and located the long file, I clicked once on it to
  32. select it, and Find crashed, but Explorer didn't seem to crash (or give me
  33. any errors)
  34. Also, I renamed an executable file to give it the same size long filename,
  35. leaving the last 3 characters as '.exe'.  Explorer didn't crash when I
  36. clicked on it, the program ran fine, and menu didn't come up when I right
  37. clicked on it.
  38.  
  39. Shortcuts do not seem to be affected by it, but I did try another file type
  40. with an association (.jpg), and it ran the program associated with it, but
  41. wouldn't let me right click on it.
  42.             -Scott
  43.  
  44. -------------------------------------------------------------------------------------
  45.  
  46. Date: Sat, 13 Feb 1999 03:13:18 +0000
  47. From: Nick Lamb <njl98r@ECS.SOTON.AC.UK>
  48. To: BUGTRAQ@netspace.org
  49. Subject: Re: Another Windows98 Bug...
  50.  
  51. On Fri, 12 Feb 1999, Jensen Allan AJE wrote:
  52.  
  53. > It seems to be an Explorer-only bug, as no other application I've tried went
  54. > down.
  55.  
  56. Every application that uses the Win95-style common file dialog will crash
  57. if you try to right-click on the over-length filename.
  58.  
  59. In addition, I tried the following apps and as well as confirming the
  60. right-click problem I attempted to open the file...
  61.  
  62. Word 7.0 seemed to ignore my attempt to open the file
  63. PowerPoint 7.0 seemed to ignore my attempt to open the file
  64. Excel 7.0 crashed with a standard crash dialog
  65. Paint Shop Pro 4.12 exited immediately without any messages
  66. Photoshop 4.0 politely said "File Not Found"
  67.  
  68. The lab test machine claims to be NT 4.00.1381, which may or may not be
  69. important for this bug nest.
  70.  
  71. Nick.
  72.  
  73. -------------------------------------------------------------------------------------
  74.  
  75. Date: Sat, 13 Feb 1999 15:51:34 -0500
  76. From: Eric Stevens <ejsteven@CS.MILLERSV.EDU>
  77. To: BUGTRAQ@netspace.org
  78. Subject: Re: Another Windows98 Bug...
  79.  
  80.     [ The following text is in the "iso-8859-1" character set. ]
  81.     [ Your display is set for the "US-ASCII" character set.  ]
  82.     [ Some characters may be displayed incorrectly. ]
  83.  
  84.   I've researched this a bit.
  85.   The real issue here seems to be that Windows (all versions including, but
  86. not limited to Win 95, 98, NT4.0 [sp3 & sp4]) apparently only accept file
  87. names up to 218 characters in length.  The maximum number of characters you
  88. can enter in the little rename file box is 214 bytes.  Any file name greater
  89. than 218 bytes including extension and dot is truncated with out attention
  90. paid to the extension in the truncation process.  Example: aaaa.....aaa.txt
  91. of length 219 would become aaaa......aaa.tx .  The Windows standard Save
  92. File dialog (Common Dialog control: comctl32.ocx) control alllows the entry
  93. of filenames up to apparently 259 bytes, which will promptly be truncated to
  94. that 217 byte limit.  This truncation is done by the comctl32.ocx control,
  95. not the program trying to save the file.  The program happily accepts the
  96. filename truncated by comctl32.ocx.  If this program attempts to append an
  97. extension on this filename, you may very well have a real issue.
  98.    Character 160 has no bearing on this whatsoever.
  99.    At 252  characters, applications receive errors when trying to save files
  100. (tested by an application I wrote myself for this purpose).
  101.      code:
  102. 1     For b = 1 To 300
  103. 2       a = Left(Trim(Str(b + 4)) + String(b, "a"), b) + ".txt"
  104. 3       Open "c:\test\" + a For Output As #1
  105. 4       Close
  106. 5     Next
  107.   line 2 declares the filename to be the value of b plus 4 (for the ".txt"
  108. on the end) plus the appropriate number of "a" 's on the end.
  109. This piece of code does not truncate the file name in any way, just returns
  110. a file not found error.  All the files whose length are greater than 217
  111. crash on right click or pushing the delete button.  The only way apparently
  112. to get rid of these guys very easily is to just drag them to the recycle
  113. bin.
  114.   Since all the lengths I've reported above don't jive with each other, I
  115. suppose the moral of this story is "When deciding how large to make your
  116. buffer, tell everyone who's working on developing your OS so they all make
  117. it the same."  If Microsoft had agreed amongst each other how long to make
  118. the file name, this wouldn't be an issue.
  119.  
  120. -----Original Message-----
  121. >From: Nick Lamb <njl98r@ECS.SOTON.AC.UK>
  122. To: BUGTRAQ@netspace.org <BUGTRAQ@netspace.org>
  123. Date: Saturday, February 13, 1999 3:04 PM
  124. Subject: Re: Another Windows98 Bug...
  125.  
  126.  
  127. >On Fri, 12 Feb 1999, Jensen Allan AJE wrote:
  128. >
  129. >> It seems to be an Explorer-only bug, as no other application I've tried
  130. went
  131. >> down.
  132. >
  133. >Every application that uses the Win95-style common file dialog will crash
  134. >if you try to right-click on the over-length filename.
  135. >
  136. >In addition, I tried the following apps and as well as confirming the
  137. >right-click problem I attempted to open the file...
  138. >
  139. >Word 7.0 seemed to ignore my attempt to open the file
  140. >PowerPoint 7.0 seemed to ignore my attempt to open the file
  141. >Excel 7.0 crashed with a standard crash dialog
  142. >Paint Shop Pro 4.12 exited immediately without any messages
  143. >Photoshop 4.0 politely said "File Not Found"
  144. >
  145. >The lab test machine claims to be NT 4.00.1381, which may or may not be
  146. >important for this bug nest.
  147. >
  148. >Nick.
  149. >
  150.  
  151.